import 'package:flutter_test/flutter_test.dart';
import 'package:text_pixel/text_pixel.dart';
import 'package:text_pixel/src/platform_interface/text_pixel_platform_interface.dart';
import 'package:text_pixel/src/method_channel/text_pixel_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockTextPixelPlatform
    with MockPlatformInterfaceMixin
    implements TextPixelPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<ColorResult> getTextColors({required int width, required int height, required List<Map<String, dynamic>> textList, required int fontSize, required int maxFrames, required int maxLines, required bool continuousPaint, required bool horizontalCenter}) {
    // TODO: implement getTextColors
    throw UnimplementedError();
  }






}

void main() {
  final TextPixelPlatform initialPlatform = TextPixelPlatform.instance;

  test('$MethodChannelTextPixel is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelTextPixel>());
  });

  test('getPlatformVersion', () async {
    TextPixel textPixelPlugin = TextPixel();
    MockTextPixelPlatform fakePlatform = MockTextPixelPlatform();
    TextPixelPlatform.instance = fakePlatform;

    expect(await textPixelPlugin.getPlatformVersion(), '42');
  });
}
